<?php
/**
 *Config
 * @OA\Schema(
 *       schema="ConfigItem",
 *       description="ConfigItem-配置项",
 *       @OA\Property(
 *            property="id",
 *            type="number"
 *       ),
 *      @OA\Property(
 *            property="name",
 *            type="string",
 *            description="名称"
 *       ),
 *       @OA\Property(
 *            property="component",
 *            type="string",
 *            description="组件"
 *      )
 * )
 *
 * @OA\Get(path="/config/parent",
 *   tags={"config"},
 *   summary="获取配置项",
 *   operationId="getConfigParent",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/QueryResponse")
 *   )
 * )
 * 
 * @OA\Schema (
 *       schema="BasicConfig",
 *       description="基础配置",
 *       @OA\Property(property="parent", type="string",description="配置项"),
 *       @OA\Property(property="site", type="object",description="站点配置",required={"name"},
 *             @OA\Property(property="name", type="string",description="站点名称"),
 *             @OA\Property(property="url", type="string",description="站点链接"),
 *             @OA\Property(property="start_at", type="string",description="站点开始时间"),
 *             @OA\Property(property="keywords", type="string",description="站点关键字"),
 *             @OA\Property(property="description", type="string",description="站点描述"),
 *             @OA\Property(property="upload", type="string",description="上传设置")
 *       ),
 *       @OA\Property(property="footer", type="object",description="底部信息",
 *             @OA\Property(property="record_number", type="string",description="备案号"),
 *             @OA\Property(property="copyright", type="string",description="版权信息"),
 *             @OA\Property(property="contact", type="string",description="联系方式"),
 *             @OA\Property(property="record_url", type="string",description="备案链接地址")
 *       ),
 *       @OA\Property(property="other", type="object",description="其它配置",
 *             @OA\Property(property="blacklist", type="string",description="黑名单IP,IP逗号隔开")
 *       )
 * )
 * 
 * @OA\Schema (
 *       schema="UploadConfig",
 *       description="上传配置",
 *       @OA\Property(property="parent", type="string",description="配置项"),
 *       @OA\Property(property="oss", type="object",description="阿里云",
 *             @OA\Property(property="prefix", type="string"),
 *             @OA\Property(property="access_key", type="string"),
 *             @OA\Property(property="secret_key", type="string"),
 *             @OA\Property(property="bucket", type="string"),
 *             @OA\Property(property="end_point", type="string"),
 *             @OA\Property(property="is_cname", type="number"),
 *       ),
 *       @OA\Property(property="qiniu", type="object",description="七牛云",
 *             @OA\Property(property="access_key", type="string"),
 *             @OA\Property(property="secret_key", type="string"),
 *             @OA\Property(property="bucket", type="string"),
 *             @OA\Property(property="domain", type="string"),
 *       ),
 *       @OA\Property(property="qcloud", type="object",description="腾讯云",
 *             @OA\Property(property="region", type="string"),
 *             @OA\Property(property="app_id", type="string"),
 *             @OA\Property(property="secret_id", type="string"),
 *             @OA\Property(property="secret_key", type="string"),
 *             @OA\Property(property="bucket", type="string"),
 *             @OA\Property(property="timeout", type="number"),
 *             @OA\Property(property="connect_timeout", type="number"),
 *             @OA\Property(property="cdn", type="string"),
 *             @OA\Property(property="scheme", type="string"),
 *             @OA\Property(property="read_from_cdn", type="number"),
 *       )
 * )
 *
 * * @OA\Get(path="/config/{parent}",
 *   tags={"config"},
 *   summary="读取配置",
 *   operationId="readConfig",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(name="parent",description="配置项",in="path",required=true,@OA\Schema(type="string")),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 * @OA\Post(path="/config",
 *   tags={"config"},
 *   summary="保存配置",
 *   operationId="saveConfig",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\RequestBody(
 *     @OA\MediaType(
 *       mediaType="application/json",
 *       @OA\Schema(
 *          oneOf={
 *          @OA\Schema(ref="#/components/schemas/BasicConfig"),
 *          @OA\Schema(ref="#/components/schemas/UploadConfig")
 *          }
 *        )
 *      )
 *     ),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 *
 *
*/